/**
 * 
 * purpose: configration of LIPTON MILK TEA website...
 * @auth: Ning
 * date: 2009-8-25
 * 
 * */
package core.section
{
	import flash.external.ExternalInterface;
	
	public class Configration
	{
		
		//START...
			
		public static var baseSwfPath:String = "/swf/";
		
		public static var baseXMLPath:String = "/xml/";
		
		public static var baseImgPath:String = "/images/";
		
		public static var baseMediaPath:String = "/media/"
		
		
		//get swf path...
		public static function getSWFPath(name:String):String
		{
			
			var path:String =  baseSwfPath + name + ".swf";
						
			return path;
			
		}
		
		
		//get images path...
		public static function getImgPath(name:String):String
		{
			
			var path:String =  baseImgPath + name;
						
			return path;
			
		}
		
		//get media path...
		public static function getMediaPath(name:String):String
		{
			
			var path:String =  baseMediaPath + name;
						
			return path;
			
		}
		
		
		//get xml path...
		public static function getXMLPath(name:String):String
		{
			
			var pattern:RegExp = /.\w{3}$/;
			
			name = pattern.test(name) ? name : name + ".xml";
						
			var path:String =  baseXMLPath + name;
									
			return path;			
						
		}
		
		
		//END
	}
}